The present invention relates generally to the field of signal processing. More particularly, the present invention relates to processing a two-dimensional data set. More particularly still, the present invention relates to determining the orientation of subject data in a two-dimensional data set.
Systems for determining the orientation of subject data in a two-dimensional data set are useful in many applications. Many examples are found in industrial automation, where the subject data represents a manufactured object and the data set is a two-dimensional image captured by a video camera. In one application, a robotic arm must know the orientation of the object so that it can grab the object. In another application, the orientation of a relay having a plurality of screws therein must be known so that the presence of all screws can be verified. In yet another example, the orientation of a label on a product must be verified. In still another example, the number of chocolates in a box of candy must be counted and, therefore, the orientation of the box must first be determined.
Pattern matching systems for identifying the orientation of an object have been implemented wherein an operator defines specific invariable features of the object (e.g., edges, corners, etc.) or the operator provides a template data set of the object to the system. In this system, the information input by the operator is compared to an acquired image data set and the image data set is rotated until a match is found. One drawback of this system is that a separate template data set is needed for each object, which is inconvenient for automation lines having multiple products. Also, this system is computationally expensive and slow since template data is compared to image data on a pixel-by-pixel basis. Furthermore, this system is not fully automatic since it requires operator input.
Principal Component Analysis (PCA) has also been implemented as an automatic method for identifying the rotational position of an object. For example, a PCA system may use main axis transformation of the object data to identify its rotational position. However, this system is only effective for distinctly elongate objects, such as a pencil.
Accordingly, there is a need for an improved system and method for determining the orientation of subject data in a two-dimensional data set. There is further a need for such a system which is automatic and requires a minimum of operator input. Further, there is a need for a system and method for identifying the orientation of subject data regardless of the inner or outer contour of the subject data. Further still, there is a need for a system for identifying the orientation of an object with a uniform contour but a varied surface texture.
According to an exemplary embodiment, a method of determining the orientation of subject data in a two-dimensional data set includes: determining a center of the subject data; determining angles from the center to each subject data; generating a frequency distribution based on the angles; and determining the orientation of the subject data based on the frequency distribution.
According to an alternative embodiment, a method of determining the orientation of object data in an image data set is disclosed. The object data includes visible characteristic data. The method includes: determining a graphical center of the object data; determining angles from the graphical center to each object data; grouping the angles into intervals; determining mean values of the visible characteristic data for each interval; and determining the orientation of the object data based on the mean values of the visible characteristic data.
According to another alternative embodiment, a system for determining the orientation of subject data in a two-dimensional data set is disclosed. The system includes means for determining a center of the subject data, means for determining angles from the center to each subject data, means for generating a frequency distribution based on the angles, and means for determining the orientation of subject: data based on the frequency distribution.
According to yet another alternative embodiment, an apparatus for determining the orientation of an object include a video camera, a memory, and a signal processing circuit. The video camera is configured to acquire an image of the object and to generate an image data set having object data. The signal processing circuit is coupled to the video camera and the memory and is configured to store the image data set in the memory, determine angles from a center of the image data set to each object data, generate a frequency distribution of the object data based on the angles, and determine the orientation of the object based on the frequency distribution.